import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    changeFlage: false
  },
  getters: {
  },
  mutations: {
    CHANGE(state,value){
      console.log('mutations中change被调用了',state,value)
      state.changeFlage=value
    }
  },
  actions: {
    change(context,value){
      console.log('change被调用了',value)
      context.commit('CHANGE',value)
    }
  },
  modules: {
  }
})
